package com.mar.bt.server;

/**
 * Represents a bluetooth server.<br/>
 * Life cycle: 
 * <ul>
 * <li>
 *  	<b>startListening( clientListener )</b> - starts server 
 * 		async connections waiting loop.
 * </li>
 * <li>
 * 		when a client is connected server calls <b>clientConnected(..)</b> from {@link IBTClientsListener}
 * 		to handle new client.
 * </li>
 * <li>
 * <b>NOTE:</b> do NOT forget call <b>shutdown</b> server object
 * is no more needed or application is going to be closed. This is
 * critical for implementations which use system resources.
 * </li>
 * </ul> 
 * @author mar
 *
 */
public interface IBluetoothServer {
	/**
	 * Starts listening for client to be connected.
	 * @param clientListener - client handler
	 */
	void startListening(IBTClientsListener clientListener);
	
	/**
	 * Disposes resources and dose stuff like this. 
	 */
	void shutdown();

}